import { createApp } from 'vue';
import { createPinia } from 'pinia';
import globals from './config/globals';
import router from './router';
import App from '@/App.vue';
import _ from '@/utils/lodash';

const app = createApp(App);
app.use(createPinia()); // 注册全局状态
app.use(ElementPlus, { locale: ElementPlusLocaleZhCn }); // 注册组件库用汉语包
app.use(globals); // 注册全局变量
app.use(router); // 注册路由
for (const [key, component] of Object.entries(ElementPlusIconsVue)) { // 注册icons
  app.component(key, component);
}

app.mount('#app');
